package com.xu.demo1;

/**
 * @author xudenghui
 * @create 2021-08-31 13:44
 **/
public class OperationDiv extends Operation{

    @Override
    double getResult() throws Exception {
        if (getNumberB() == 0){
            throw  new Exception("除数不能为0!");
        }
        double number =  getNumberA() / getNumberB();
        return number;
    }
}
